
define(['angular', 'store'], function (angular, store) {
    "use strict";

    var factory = function ($location,$http,$q,$sce,WT_BASE_PATH,WZ_BASE_PATH,CommonService,LocalCacheService) {

        return {

            sendMobileCode : function(data){
                data.op_station = LocalCacheService.get("op_station");
                var params = {};
                params.isReject = true;
                params.url="/trade/user/send_mobile_code";
                params.data=data;
                return CommonService.ajax(params);
            },
            checkMobileCode : function(data){
                var params = {};
                params.isReject = true;
                params.url="/trade/user/check_mobile_code";
                params.data=data;
                return CommonService.ajax(params);
            },
            modifyMobile : function(data){
                var params = {};
                params.isReject = true;
                params.url="/trade/user/modify_mobile_num";
                params.data = data;
                return CommonService.ajax(params);
            },
            resetMobile : function(status){
                var params = {};
                params.styleType = 1;
                params.url="/trade/user/reset_mobile";
                params.data = {status:status};
                params.isReject = true;
                return CommonService.ajax(params);
            },
            modifyProfession : function(profession_code){
                var params = {};
                params.url="/trade/user/modify_user_info";
                params.styleType = 1;
                params.isReject = true;
                params.data = {profession_code: profession_code};
                return CommonService.ajax(params);
            },
            modifyDegree : function(degree_code){
                var params = {};
                params.url="/trade/user/modify_user_info";
                params.styleType = 1;
                params.isReject = true;
                params.data = {degree_code: degree_code};
                return CommonService.ajax(params);
            },
            modifyAddress : function(address){
                var params = {};
                params.url="/trade/user/modify_user_info";
                params.styleType = 1;
                params.isReject = true;
                params.data = {address: address};
                return CommonService.ajax(params);
            },
            modifyZipcode : function(zipcode){
                var params = {};
                params.url="/trade/user/modify_user_info";
                params.styleType = 1;
                params.isReject = true;
                params.data = {zipcode: zipcode};
                return CommonService.ajax(params);
            },
            modifyIdDate : function(idate){
                var params = {};
                params.url="/trade/user/modify_user_info";
                params.styleType = 1;
                params.data = idate;
                params.isReject = true;
                return CommonService.ajax(params);
            }
        }
    };

    factory.$inject = ['$location','$http','$q','$sce','WT_BASE_PATH','WZ_BASE_PATH','CommonService','LocalCacheService'];
    return factory;
});